﻿CREATE PROCEDURE dbo.SP_MemberCommitties_Insert
	@Church NVarChar (256)  =  NULL 
		, @DayOfMonth TinyInt   =  NULL 
		, @DayOfWeek TinyInt   =  NULL 
		, @IsServant Bit   =  NULL 
		, @MemberId Int   =  NULL 
		, @Name NVarChar (256)  =  NULL 
		, @OccurreEveryMonths TinyInt   =  NULL 
		, @OccurreEveryWeeks Int   =  NULL 
		, @OccurrenceType TinyInt   =  NULL 
		, @ServantType NVarChar (256)  =  NULL 
		, @TimeOfWeek DateTime   =  NULL 
		, @WeekOfMonth TinyInt   =  NULL 
		AS
			INSERT INTO MemberCommitties
			(
									Church
												,DayOfMonth
												,DayOfWeek
												,IsServant
												,MemberId
												,Name
												,OccurreEveryMonths
												,OccurreEveryWeeks
												,OccurrenceType
												,ServantType
												,TimeOfWeek
												,WeekOfMonth
									)
			Values(
									@Church
												,@DayOfMonth
												,@DayOfWeek
												,@IsServant
												,@MemberId
												,@Name
												,@OccurreEveryMonths
												,@OccurreEveryWeeks
												,@OccurrenceType
												,@ServantType
												,@TimeOfWeek
												,@WeekOfMonth
						)
			return @@identity